fix(security): replace method wildcards with explicit GET+POST in baseline policy#1034
fix(security): replace method wildcards with explicit GET+POST in baseline policy#1034stikman28 wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
…eline policy Replace `method: "*"` with explicit `GET` and `POST` rules on all inference provider endpoints in the baseline sandbox policy: - api.anthropic.com (Claude API) - statsig.anthropic.com (telemetry) - sentry.io (crash reporting) - integrate.api.nvidia.com (NVIDIA inference) - inference-api.nvidia.com (NVIDIA inference alt) The wildcard permits DELETE, PUT, and PATCH methods that these APIs do not require. Inference calls use POST (completions, messages, token counting) and GET (model listing, health checks, usage). Restricting to these two methods reduces the attack surface if an agent or plugin is compromised — it cannot issue destructive HTTP methods against the inference providers. No functional change: all existing agent operations (inference, telemetry, crash reporting) use only GET and POST.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates a network sandbox policy YAML file to replace wildcard HTTP method allowances with explicit GET and POST methods for specified external API hosts, and adds a test to validate the policy contains no wildcard method rules. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Replace
method: "*"with explicitGETandPOSTrules on all inference provider endpoints in the baseline sandbox policy. The wildcard permits DELETE, PUT, and PATCH methods that these APIs do not require, increasing the attack surface if an agent or plugin is compromised.Changes
api.anthropic.com:method: "*"→GET+POSTstatsig.anthropic.com:method: "*"→GET+POSTsentry.io:method: "*"→GET+POSTintegrate.api.nvidia.com:method: "*"→GET+POSTinference-api.nvidia.com:method: "*"→GET+POSTInference calls use POST (completions, messages, token counting) and GET (model listing, health checks, usage). No other HTTP methods are required. No functional change.
Type of Change
Testing
test/security-method-wildcards.test.js— validates nomethod: "*"wildcards exist in baseline policynpx prek run --all-filespasses.npm testpasses.Checklist
General
Code Changes
Summary by CodeRabbit
Security
Tests